﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Diagnostics;

namespace WindowsFormsApplication3.入库信息管理
{
    public partial class order_edit : Form
    {
        public int temp_ID;
        public string temp_species, temp_demand, temp_number, temp_picture, temp_time;
        public order_edit()
        {
            InitializeComponent();
        }

        private void order_edit_Load(object sender, EventArgs e)
        {

            text_species.Text    = temp_species;
            text_demand.Text     = temp_demand;
            text_number.Text     = temp_number;
            text_picture.Text    = temp_picture;
            dateTimePicker1.Text = temp_time;
        }

        private void button_OK_Click(object sender, EventArgs e)
        {

            权限管理.permissionManaging.mySql.excute_sql("update materialOrderTable set "
                + "species = '" + text_species.Text + "', "
                + "demand  = '" + text_demand.Text  + "', "
                + "number  = '" + text_number.Text  + "', "
                + "picture = '" + text_picture.Text + "', "
                + "times    = '" + dateTimePicker1.Text + "' "
                + "where orderID = '" + temp_ID + "'" );

            Debug.WriteLine("update materialOrderTable set "
                + "species = '" + text_species.Text + "', "
                + "demand  = '" + text_demand.Text + "', "
                + "number  = '" + text_number.Text + "', "
                + "picture = '" + text_picture.Text + "', "
                + "times    = '" + dateTimePicker1.Text + "' "
                + "where orderID = '" + temp_ID + "'");
            this.Dispose();
        }

        private void button_cancel_Click(object sender, EventArgs e)
        {
            this.Dispose();
        }

    }
}
